<%@ Page Title="Deal" Language="C#" MasterPageFile="~/Admin/Membership.master" AutoEventWireup="true"
    CodeFile="Deal.aspx.cs" Inherits="Admin_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <br />
      <br />
    <br />
     <br />
    <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
    <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" AllowSorting="True"
        AutoGenerateColumns="False" Width="97%" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
        AllowAutomaticDeletes="true" ShowStatusBar="True" GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound"
        OnItemCreated="RadGrid1_ItemCreated" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
        OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
        OnItemCommand="RadGrid1_ItemCommand" OnInsertCommand="RadGrid1_InsertCommand"
        Skin="WebBlue">
        <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
        <MasterTableView Width="100%" CommandItemDisplay="Top" ClientDataKeyNames="DealID,SellStartDate,SellStartTime,SellEndDate,SellEndTime,SellPrice,RegularPrice,Discount,DealCityID,LimitPerPerson">
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton">
                    <HeaderStyle Width="3%" />
                </telerik:GridEditCommandColumn>
                <telerik:GridTemplateColumn HeaderText="" UniqueName="" SortExpression="">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblName1" Text="" />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
                            SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab Text="Deal">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Deal Address Detail">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Highlights">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
                            <telerik:RadPageView ID="RadPageView1" runat="server" BorderColor="Black" BorderStyle="Solid"
                                BorderWidth="1">
                                <br />
                                <table cellspacing="0">
                                    <tr>
                                        <td>
                                            Deal Type
                                        </td>
                                        <td>
                                            <asp:RadioButtonList ID="rbtnDealType" runat="server" RepeatDirection="Horizontal">
                                                <asp:ListItem Selected="True" Value="1">Main Deal</asp:ListItem>
                                                <asp:ListItem Value="2">Side Deal</asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                        <td>
                                            Category
                                        </td>
                                        <td>
                                            <telerik:RadComboBox ID="dropCategory" runat="server" EmptyMessage="Choose a Category"
                                                EnableLoadOnDemand="true">
                                            </telerik:RadComboBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="dropCategory"
                                                ErrorMessage="Select category" InitialValue="0">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            City:
                                        </td>
                                        <td>
                                            <telerik:RadComboBox ID="dropCity" runat="server" EmptyMessage="Choose a City" MarkFirstMatch="true">
                                            </telerik:RadComboBox>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator21" ControlToValidate="dropCity"
                                                ErrorMessage="!">*
                                            </asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            Vendor
                                        </td>
                                        <td>
                                            <telerik:RadComboBox ID="dropVendor" runat="server" Height="200px" Width="150px"
                                                DropDownWidth="298px" EmptyMessage="Choose a Vendor" HighlightTemplatedItems="true"
                                                EnableLoadOnDemand="true" AutoPostBack="true">
                                                <HeaderTemplate>
                                                    <table style="width: 275px" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td style="width: 177px;">
                                                                VendorName
                                                            </td>
                                                            <td style="width: 177px;">
                                                                Address1
                                                            </td>
                                                            <td style="width: 40px;">
                                                                State
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <table style="width: 275px" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td style="width: 177px;">
                                                                <%# DataBinder.Eval(Container, "Attributes['VendorName']")%>
                                                            </td>
                                                            <td style="width: 177px;">
                                                                <%# DataBinder.Eval(Container, "Attributes['Address1']")%>
                                                            </td>
                                                            <td style="width: 40px;">
                                                                <%# DataBinder.Eval(Container, "Attributes['State']")%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </telerik:RadComboBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="dropVendor"
                                                ErrorMessage="Select vendor" InitialValue="0">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Title
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>' Width="670px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                                                ErrorMessage="Enter title">*</asp:RequiredFieldValidator>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Shorter Description
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtShortDescription" runat="server" Text='<%# Bind("ShortDescription") %>'
                                                Width="670px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtShortDescription"
                                                ErrorMessage="Enter Short Description">*</asp:RequiredFieldValidator>
                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Description
                                        </td>
                                        <td colspan="3">
                                            <telerik:RadEditor runat="server" ID="txtDescription" Height="200px" EnableResize="false"
                                                Content='<%# Bind("Description") %>'>
                                                <Tools>
                                                    <telerik:EditorToolGroup>
                                                        <telerik:EditorTool Name="RichEditor" Text="Open Advanced Editor" />
                                                        <telerik:EditorTool Name="Bold" />
                                                        <telerik:EditorTool Name="Italic" />
                                                        <telerik:EditorTool Name="Underline" />
                                                        <telerik:EditorTool Name="Cut" />
                                                        <telerik:EditorTool Name="Copy" />
                                                        <telerik:EditorTool Name="Paste" />
                                                        <telerik:EditorTool Name="FontName" />
                                                        <telerik:EditorTool Name="RealFontSize" />
                                                    </telerik:EditorToolGroup>
                                                </Tools>
                                                <Content>
                                                </Content>
                                            </telerik:RadEditor>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            FootPrint
                                        </td>
                                        <td colspan="3">
                                            <telerik:RadEditor runat="server" ID="txtFootPrint" Height="150px" EnableResize="false"
                                                Content='<%# Bind("FootPrint") %>'>
                                                <Tools>
                                                    <telerik:EditorToolGroup>
                                                        <telerik:EditorTool Name="RichEditor" Text="Open Advanced Editor" />
                                                        <telerik:EditorTool Name="Bold" />
                                                        <telerik:EditorTool Name="Italic" />
                                                        <telerik:EditorTool Name="Underline" />
                                                        <telerik:EditorTool Name="Cut" />
                                                        <telerik:EditorTool Name="Copy" />
                                                        <telerik:EditorTool Name="Paste" />
                                                        <telerik:EditorTool Name="FontName" />
                                                        <telerik:EditorTool Name="RealFontSize" />
                                                    </telerik:EditorToolGroup>
                                                </Tools>
                                                <Content>
                                                </Content>
                                            </telerik:RadEditor>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Minimum Quantity
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtMinQty" runat="server" Text='<%# Bind("MinQty") %>' Width="70px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtMinQty"
                                                ErrorMessage="Enter minimum quantity">*</asp:RequiredFieldValidator>
                                            <telerik:RadInputManager ID="RadInputManager1" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtMinQty" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                        <td>
                                            Maximum Quantity
                                        </td>
                                        <td class="style2">
                                            <asp:TextBox ID="txtMaxQty" runat="server" Text='<%# Bind("MaxQty") %>' Width="70px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtMaxQty"
                                                ErrorMessage="Enter maximum quantity">*</asp:RequiredFieldValidator>
                                            <telerik:RadInputManager ID="RadInputManager2" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtMaxQty" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Regular Price
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegularPrice" runat="server" Text='<%# Bind("RegularPrice") %>'
                                                Width="70px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtRegularPrice"
                                                ErrorMessage="Enter regular price">*</asp:RequiredFieldValidator>
                                            <telerik:RadInputManager ID="RadInputManager3" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtRegularPrice" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                        <td>
                                            Sell Price
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtSellPrice" runat="server" Text='<%# Bind("SellPrice") %>' Width="70px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtSellPrice"
                                                ErrorMessage="Enter selling price">*</asp:RequiredFieldValidator>
                                            <telerik:RadInputManager ID="RadInputManager4" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtSellPrice" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Discount
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtDiscount" runat="server" MaxLength="3" Width="70px" Text='<%# Bind("Discount") %>'></asp:TextBox>
                                            %
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtDiscount"
                                                ErrorMessage="Enter discount">*</asp:RequiredFieldValidator>
                                            <telerik:RadInputManager ID="RadInputManager5" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtDiscount" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                        <td>
                                            Limit Per Person
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtLimitPerPerson" runat="server" Width="70px" Text='<%# Bind("LimitPerPerson") %>'></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtLimitPerPerson"
                                                ErrorMessage="Enter Limit Per Person">*</asp:RequiredFieldValidator>
                                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" TargetControlID="txtLimitPerPerson"
                                                FilterMode="ValidChars" FilterType="Numbers" runat="server" ValidChars="0123456789">
                                            </cc1:FilteredTextBoxExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Percentage Cut
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPercentageCut" runat="server" Text='<%# Bind("PercentageCut") %>'
                                                Width="70px"></asp:TextBox>
                                            <telerik:RadInputManager ID="RadInputManager6" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtPercentageCut" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                        <td>
                                            Sales Person Percentage Cut
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtSalesPersonPercentageCut" runat="server" Text='<%# Bind("SalesPersonPercentageCut") %>'
                                                Width="70px"></asp:TextBox>
                                            <telerik:RadInputManager ID="RadInputManager7" runat="server">
                                                <telerik:NumericTextBoxSetting BehaviorID="NumericBehavior1" EmptyMessage="type.."
                                                    Type="Number" Validation-IsRequired="true">
                                                    <TargetControls>
                                                        <telerik:TargetInput ControlID="txtSalesPersonPercentageCut" />
                                                    </TargetControls>
                                                </telerik:NumericTextBoxSetting>
                                            </telerik:RadInputManager>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Sell Start Date
                                        </td>
                                        <td>
                                            <telerik:RadDatePicker ID="RadDatePicker1" runat="server" />
                                            <div style="clear: both">
                                            </div>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" ControlToValidate="RadDatePicker1"
                                                ErrorMessage="Enter  Sell Start Date">*</asp:RequiredFieldValidator>
                                        </td>
                                        <td valign="top" colspan="3">
                                            Select Start time:
                                            <telerik:RadTimePicker ID="RadTimePicker2" runat="server" />
                                            <div style="clear: both">
                                            </div>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator13" ControlToValidate="RadTimePicker2"
                                                ErrorMessage="Enter  Start time">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Sell End Date
                                        </td>
                                        <td class="style1">
                                            <telerik:RadDatePicker ID="RadDatePicker2" runat="server" />
                                            <div style="clear: both">
                                            </div>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" ControlToValidate="RadDatePicker2"
                                                ErrorMessage="Enter  End Date">*</asp:RequiredFieldValidator>
                                        </td>
                                        <td valign="top" colspan="3">
                                            Select End time:
                                            <telerik:RadTimePicker ID="RadTimePicker1" runat="server" />
                                            <div style="clear: both">
                                            </div>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator15" ControlToValidate="RadTimePicker1"
                                                ErrorMessage="Enter  End time">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <%--     <tr>
                                        <td>
                                            Post On Twitter
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="chkTwitter" runat="server" Checked="true"  />
                                        </td>
                                        <td>
                                        </td>
                                    </tr>--%>
                                    <tr>
                                        <td>
                                            Expiration Date
                                        </td>
                                        <td class="style1">
                                            <telerik:RadDatePicker ID="RadDatePicker3" runat="server" />
                                            <div style="clear: both">
                                            </div>
                                            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator11" ControlToValidate="RadDatePicker3"
                                                ErrorMessage="Enter Expiration Date">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Image
                                        </td>
                                        <td class="style1">
                                            <asp:FileUpload ID="GraphicImage" runat="server" kOnDataBinding="GraphicImage_FileUploaded" />
                                            <asp:RegularExpressionValidator ID="revImage" ControlToValidate="GraphicImage" ValidationExpression="^.*\.((j|J)(p|P)(e|E)?(g|G)|(g|G)(i|I)(f|F)|(p|P)(n|N)(g|G))$"
                                                Text=" ! Invalid image type" runat="server">*</asp:RegularExpressionValidator>
                                        </td>
                                        <td colspan="2">
                                            <asp:Image ID="ImgPreview" Height="100" Width="100" runat="server" ImageUrl="" />
                                        </td>
                                        <td class="style2">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="False"
                                                ShowSummary="True" />
                                            <br />
                                            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView2" runat="server" BorderColor="Black" BorderStyle="Solid"
                                BorderWidth="1">
                                <br />
                                <telerik:RadGrid runat="server" ID="RadGrid2" AllowPaging="False" AutoGenerateColumns="False"
                                    Width="100%" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" AllowAutomaticDeletes="true"
                                    ShowStatusBar="True" GridLines="None" PageSize="10" OnInsertCommand="RadGrid2_InsertCommand"
                                    Skin="WebBlue" OnDeleteCommand="RadGrid2_DeleteCommand" OnUpdateCommand="RadGrid2_UpdateCommand">
                                    <GroupPanel Text="AddressDeatils(Can Add Multiple Address)">
                                    </GroupPanel>
                                    <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
                                    <MasterTableView Width="100%" CommandItemDisplay="Top" ClientDataKeyNames="DealAddressID">
                                        <Columns>
                                            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit">
                                            </telerik:GridEditCommandColumn>
                                            <telerik:GridTemplateColumn HeaderText="" UniqueName="" SortExpression="">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblName1" Text="" />
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <table>
                                                        <tr>
                                                            <td colspan="2">
                                                                <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"></asp:Label>
                                                            </td>
                                                        </tr>
                                                         <tr>
                                                            <td>
                                                               Name
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address 1
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtAddress1" runat="server" Text='<%# Bind("Address1") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Address 2
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtAddress2" runat="server" Text='<%# Bind("Address2") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                City
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtCity" runat="server" Text='<%# Bind("City") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                State
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtState" runat="server" Text='<%# Bind("State") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                ZipCode
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="ZipCode" runat="server" MaxLength="9" Text='<%# Bind("Zipcode") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                         <tr>
                                                            <td>
                                                                Phone No
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtPhoneNo" runat="server"  Text='<%# Bind("PhoneNo") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                WebSite
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtWebSite" runat="server" Text='<%# Bind("Website") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Email
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtEmail" runat="server" Text='<%# Bind("Email") %>'></asp:TextBox>
                                                                <telerik:RadInputManager ID="RadInputManager8" runat="server">
                                                                    <telerik:RegExpTextBoxSetting BehaviorID="RagExpBehavior1" Validation-IsRequired="true"
                                                                        ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="Invalid Email"
                                                                        Validation-ValidationGroup="Address">
                                                                        <TargetControls>
                                                                            <telerik:TargetInput ControlID="txtEmail" />
                                                                        </TargetControls>
                                                                    </telerik:RegExpTextBoxSetting>
                                                                </telerik:RadInputManager>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                             <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name" DataField="Name"
                                                SortExpression="NAme">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblName" runat="server" Text='<%#(Eval("Name")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="Address1" UniqueName="Address1" DataField="Address1"
                                                SortExpression="Address1">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAddress1" runat="server" Text='<%#(Eval("Address1")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="Address2" UniqueName="Address2" DataField="Address2"
                                                SortExpression="Address2">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblAddress2" runat="server" Text='<%#(Eval("Address2")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="City" UniqueName="City" DataField="City"
                                                SortExpression="City">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCity" runat="server" Text='<%#(Eval("City")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="State" UniqueName="State" DataField="State"
                                                SortExpression="State">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblState" runat="server" Text='<%#(Eval("State")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="ZipCode" UniqueName="ZipCode" DataField="ZipCode"
                                                SortExpression="ZipCode">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblZipCode" runat="server" Text='<%#(Eval("ZipCode")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                                 <telerik:GridTemplateColumn HeaderText="PhoneNo" UniqueName="PhoneNo" DataField="PhoneNo"
                                                SortExpression="PhoneNo">
                                                <ItemTemplate>
                                                    <asp:Label ID="PhoneNo" runat="server" Text='<%#(Eval("PhoneNo")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="WebSite" UniqueName="WebSite" DataField="WebSite"
                                                SortExpression="WebSite">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblWebSite" runat="server" Text='<%#(Eval("WebSite")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="Email" UniqueName="Email" DataField="Email"
                                                SortExpression="Email">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblEmail" runat="server" Text='<%#(Eval("Email")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridButtonColumn ConfirmText="Delete this address detail?" ConfirmDialogType="RadWindow"
                                                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" HeaderText="Delete" />
                                        </Columns>
                                        <EditFormSettings>
                                            <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle>
                                            <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>
                                            <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>
                                            <EditColumn ButtonType="ImageButton" />
                                        </EditFormSettings>
                                        <PagerStyle Mode="NumericPages"></PagerStyle>
                                    </MasterTableView>
                                    <ClientSettings AllowDragToGroup="true" />
                                </telerik:RadGrid>
                                <br />
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView3" runat="server" BorderColor="Black" BorderStyle="Solid"
                                BorderWidth="1">
                                <br />
                                <telerik:RadGrid runat="server" ID="RadGrid3" AllowPaging="False" AutoGenerateColumns="False"
                                    Width="100%" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" AllowAutomaticDeletes="true"
                                    ShowStatusBar="True" GridLines="None" PageSize="10" OnInsertCommand="RadGrid3_InsertCommand"
                                    Skin="WebBlue" OnDeleteCommand="RadGrid3_DeleteCommand" OnUpdateCommand="RadGrid3_UpdateCommand">
                                    <GroupPanel Text="Highlights">
                                    </GroupPanel>
                                    <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
                                    <MasterTableView Width="100%" CommandItemDisplay="Top" ClientDataKeyNames="HighLightID">
                                        <Columns>
                                            <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit">
                                            </telerik:GridEditCommandColumn>
                                            <telerik:GridTemplateColumn HeaderText="" UniqueName="" SortExpression="">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblName1" Text="" />
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                HighLight
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtHighLights" runat="server" Text='<%# Bind("HighLights") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="HighLights" UniqueName="HighLights" DataField="HighLights"
                                                SortExpression="HighLights">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblHighLights" runat="server" Text='<%#(Eval("HighLights")) %>' />
                                                </ItemTemplate>
                                                <ItemStyle VerticalAlign="Top" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridButtonColumn ConfirmText="Delete this highlight?" ConfirmDialogType="RadWindow"
                                                ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" HeaderText="Delete" />
                                        </Columns>
                                        <EditFormSettings>
                                            <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle>
                                            <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>
                                            <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>
                                            <EditColumn ButtonType="ImageButton" />
                                        </EditFormSettings>
                                        <PagerStyle Mode="NumericPages"></PagerStyle>
                                    </MasterTableView>
                                    <ClientSettings AllowDragToGroup="true" />
                                </telerik:RadGrid>
                                <br />
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>
                    </EditItemTemplate>
                    <HeaderStyle Width="2%" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name" DataField="Name"
                    SortExpression="Name">
                    <ItemTemplate>
                        <asp:Label ID="lblNAme" runat="server" Text='<%# TrimDescription(Eval("Name") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Description" UniqueName="Description" DataField="Description">
                    <ItemTemplate>
                        <asp:Label ID="lblDescription" runat="server" Text='<%# TrimDescription(Eval("Description") as string) %>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Price">
                    <ItemTemplate>
                        <asp:Label ID="lblPrice" runat="server" Text="" />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Date">
                    <ItemTemplate>
                        <asp:Label ID="lblDate" runat="server" Text="" />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="City">
                    <ItemTemplate>
                        <asp:Label ID="lblCity" runat="server" Text='<%#Bind("City")%>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Image">
                    <ItemTemplate>
                        <asp:Image ID="Image1" Height="100" Width="100" runat="server" ImageUrl='<%# Eval("DealID", "ImageDisplay.aspx?DealID={0}")%>' />
                    </ItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this deal?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />
            </EditFormSettings>
            <PagerStyle Mode="NumericPages"></PagerStyle>
        </MasterTableView>
    </telerik:RadGrid>
    <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
</asp:Content>
